package it.polimi.travelDream.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;


@Entity
@Table(name="STAFF", uniqueConstraints= {
		@UniqueConstraint(columnNames = "username"),
		@UniqueConstraint(columnNames = "mail")})
public class Staff  implements Serializable {

	/**
	 * Id is the Primary Key
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int IDstaff;
	
	private boolean permission;
	private String username;
	private String password;
	private String mail;
	private String name;
	private String surname;
	
	
	private static final long serialVersionUID = 1L;
	
	public Staff(){
		
	}
		
	public Staff(int iDstaff, boolean permission, String username,
			String name, String surname, String mail, String password) {
		super();
		IDstaff = iDstaff;
		this.permission = permission;
		this.username = username;
		this.password = password;
		this.mail = mail;
		this.name = name;
		this.surname = surname;
	}


	public int getId() {
		return IDstaff;
	}
	

	public String getUsername() {
		return username;
	}


	public void setUsername(String username) {
		this.username = username;
	}


	public String getName() {
		return name;
	}
	
	public Boolean isPermission() {
		return this.permission;
	}
	
	public void setPermission(boolean p) {
		this.permission = p;
	}

	public void setName(String name) {
		this.name = name;
	}


	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getEmail() {
		return mail;
	}

	public void setEmail(String email) {
		this.mail = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
